{% extends "./../base.html" %}
{% block title%}所有文章{%endblock%}
{% block toolbar %} {% include "./toolbar.html" %} {%endblock%}
{% block msg %} {%include "../msg.index"%} {%endblock%}
{% block content %}
<table class="table table-striped table-hover">
    <thead>
        <tr>
            <th>ID</th>
            <th>标题</th>
            <th>分类</th>
            <th>摘要</th>
            <th>浏览次数</th>
            <th>时间</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {% for item in list.data%}
        <tr>
            <td>{{ item.id }}</td>
            <td>{{ item.title }}</td>
            <td>{{ item.category_name }}</td>
            <td>{{ item.summary }}</td>
            <td>{{ item.hit }}</td>
            <td class="dateline">{{ item.dateline() }}</td>
            <td>
                <a href="/admin/topic/edit/{{ item.id }}" class="btn btn-primary btn-sm">修改</a>
                <a href="/admin/topic/del/{{ item.id }}" class="btn btn-danger btn-sm" onclick="return confirm('确定删除「{{ item.title }}」');">删除</a>
            </td>
        </tr>
        {%endfor%}
    </tbody>
</table>
{% include "../../pagination.html" %}
{%endblock%}
